package y24.m3.java;

import java.util.HashMap;
import java.util.Scanner;
/**
 * @author 骆天齐
 * @version 1.0
 * 投票
 */
public class Test5 {
    public static void main(String[] args) throws InterruptedException {
        Scanner scanner= new Scanner(System.in);
        int[] arr=new int[5] ;
        System.out.println("请输入候选人姓名");
        String s=scanner.next() ;
        while(!"#".equals(s) ){
            switch(s){
                case "a":
                    arr[0]++;
                    break;
                case "b":
                    arr[1]++;
                    break;
                case "c":
                    arr[2]++;
                    break;
                case "d":
                    arr[3]++;
                    break;
                default :
                    arr[4]++;
                    break;
            }

            System.out.println("a:"+arr[0]+" b:"+arr[1]+" c:"+arr[2]+" d:"+arr[3]+" "+arr[4]);
            s = scanner.next() ;
        }
    }
}
